package com.qkl.xiatang.app.service.impl;

import com.qkl.xiatang.app.config.AppConfig;
import com.qkl.xiatang.app.utils.CryptoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 加解密
 */
@Service
public class CryptoService {

    @Autowired
    private AppConfig appConfig;

    /**
     *
     * @param ciphertext 密文
     * @return
     */
    public String decrypt(String ciphertext){
        return CryptoUtils.decryptByAES(appConfig.getAppAesSecret(),ciphertext);
    }


}
